package cn.doit.scala.day06.exts


import java.io.File
import scala.io.{BufferedSource, Source}

/**
 * @DATE 2021/12/31/10:06
 * @Author MDK
 * @Version 2021.2.2
 * */
object C02_Implicit {
  implicit def advice(f:File):BufferedSource={
    val bs: BufferedSource = Source.fromFile(f)
    bs
  }
  def main(args: Array[String]): Unit = {
    val file = new File("d://aaa//1.txt")
    val lines: Iterator[String] = file.getLines()
    lines.foreach(println)
  }
}
